package com.myapp.struts.menu;

import java.util.ArrayList;

public class GBAllDayText {

    private static GBAllDayText gbAllDayTextObj;
    ArrayList<FoodItems> gbAllDayTextArray = new ArrayList<FoodItems>();

    public static synchronized GBAllDayText getSingletonObject() {
        if (gbAllDayTextObj == null) {
            gbAllDayTextObj = new GBAllDayText();
        }
        return gbAllDayTextObj;
    }

    public Object clone() throws CloneNotSupportedException {
        throw new CloneNotSupportedException();
    }

    public String getGBAllDayText(String fileLoc) {
        String fileName = "";

        MenuRead menuReadObj = new MenuRead();
        gbAllDayTextArray = menuReadObj.ReadMenu(Constants.GREAT_BRITAN);
        
        MenuGenerate menuGenerateObj = new MenuGenerate();
        gbAllDayTextArray = menuGenerateObj.GenerateMenu(gbAllDayTextArray, "ALLDAY");

        MenuFormat menuFormatObj = new MenuFormat();
        fileName = menuFormatObj.FormatMenu(gbAllDayTextArray, Constants.TEXT, fileLoc);
        return fileName;

    }
}
